package io.adrainty.bolee.trade.feign;

import io.adrainty.bolee.framework.commons.basic.ResultDTO;
import io.adrainty.bolee.trade.hystrix.WapPayFeignHystrix;
import io.adrainty.bolee.trade.models.entity.TradeEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>WapPayFeign</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description 手机网页支付feign接口
 * @since 2025/8/28 13:50:34
 */

@FeignClient(value = "trade-web", path = "/trade-wap-feign", fallback = WapPayFeignHystrix.class)
public interface IWapPayFeign {

    /**
     * <p>生成交易表单，渲染后自动跳转支付宝或者微信引导用户完成支付</p>
     *
     * @param tradeVO 交易信息
     * @return ResultDTO<TradeEntity>
     * @author AdRainty
     * @since 2025/8/28 13:50:34
     */
    @PostMapping("/wap-trade")
    ResultDTO<TradeEntity> wapTrade(@RequestBody TradeEntity tradeVO);


}
